﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:local="using:CalendarWindowsApp">
	<Style x:Key="RoundIconButtonStyle"
		   TargetType="Button"
		   BasedOn="{StaticResource IconButtonStyle}">
		<Setter Property="VerticalAlignment"
				Value="Top" />
		<Setter Property="HorizontalAlignment"
				Value="Left" />
		<Setter Property="FontFamily"
				Value="{ThemeResource ContentControlThemeFontFamily}" />
		<Setter Property="FontWeight"
				Value="Normal" />
		<Setter Property="Margin"
				Value="0" />
		<Setter Property="Padding"
				Value="0" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid Background="Transparent"
						  x:Name="RootGrid">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill"
																	   Storyboard.TargetName="Ellipse">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPointerOverBackgroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
																	   Storyboard.TargetName="Content">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke"
																	   Storyboard.TargetName="Ellipse">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonBorderThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill"
																	   Storyboard.TargetName="Ellipse">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPressedBackgroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
																	   Storyboard.TargetName="Content">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="White" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
																	   Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="Collapsed" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation Duration="0"
														 To="1"
														 Storyboard.TargetProperty="Opacity"
														 Storyboard.TargetName="FocusVisualWhite" />
										<DoubleAnimation Duration="0"
														 To="1"
														 Storyboard.TargetProperty="Opacity"
														 Storyboard.TargetName="FocusVisualBlack" />
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
								<VisualState x:Name="PointerFocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid Height="40"
							  Width="40">
							<Ellipse x:Name="Ellipse"
									 Fill="{ThemeResource AppBarItemBackgroundThemeBrush}"
									 Stroke="{TemplateBinding Foreground}"
									 StrokeThickness="1"
									 UseLayoutRounding="False" />
							<ContentPresenter x:Name="Content"
											  AutomationProperties.AccessibilityView="Raw"
											  ContentTemplate="{TemplateBinding ContentTemplate}"
											  ContentTransitions="{TemplateBinding ContentTransitions}"
											  Content="{TemplateBinding Content}"
											  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
											  Margin="{TemplateBinding Padding}"
											  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
											  Foreground="{TemplateBinding Foreground}" />
						</Grid>
						<Rectangle x:Name="FocusVisualWhite"
								   IsHitTestVisible="False"
								   Opacity="0"
								   StrokeDashOffset="1.5"
								   StrokeEndLineCap="Square"
								   Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}"
								   StrokeDashArray="1,1" />
						<Rectangle x:Name="FocusVisualBlack"
								   IsHitTestVisible="False"
								   Opacity="0"
								   StrokeDashOffset="0.5"
								   StrokeEndLineCap="Square"
								   Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}"
								   StrokeDashArray="1,1" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="Button"
		   x:Key="IconButtonStyle">
		<Setter Property="Background"
				Value="{ThemeResource ButtonBackgroundThemeBrush}" />
		<Setter Property="Foreground"
				Value="{ThemeResource ButtonForegroundThemeBrush}" />
		<Setter Property="Height"
				Value="40" />
		<Setter Property="Width"
				Value="40" />
		<Setter Property="Padding"
				Value="10" />
		<Setter Property="BorderThickness"
				Value="0" />
		<Setter Property="FontFamily"
				Value="{ThemeResource ContentControlThemeFontFamily}" />
		<Setter Property="FontWeight"
				Value="SemiBold" />
		<Setter Property="FontSize"
				Value="{ThemeResource ControlContentThemeFontSize}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
																	   Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPointerOverBackgroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
																	   Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
																	   Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPressedBackgroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
																	   Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonPressedForegroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
																	   Storyboard.TargetProperty="Background">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonDisabledBackgroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
																	   Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0"
																	Value="{ThemeResource ButtonDisabledForegroundThemeBrush}" />
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Border"
								Background="{TemplateBinding Background}"
								Width="{TemplateBinding Width}"
								Height="{TemplateBinding Height}"
								Margin="0">
							<ContentPresenter x:Name="ContentPresenter"
											  Content="{TemplateBinding Content}"
											  ContentTransitions="{TemplateBinding ContentTransitions}"
											  ContentTemplate="{TemplateBinding ContentTemplate}"
											  Margin="{TemplateBinding Padding}"
											  Foreground="{TemplateBinding Foreground}"
											  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
											  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
											  AutomationProperties.AccessibilityView="Raw" />
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>